<template>
  <el-table-column
    :show-overflow-tooltip="column.showToolTip ? column.showToolTip : true"
    :type="column.type ? column.type : null"
    :headerAlign="column.headerAlign || 'center'"
    :fixed="column.fixed"
    :prop="column.dataName"
    :label="column.label"
    :width="column.width || 'auto'"
    :min-width="column.minWidth"
    :align="column.align"
    :sortable="column.sortable || false"
    :index="column.index"
    :reserve-selection="column.reserveSelection"
    :selectable="column.selectable"
    :formatter="column.formatter"
    :sort-method="column.sortMethod"
    :render-header="column.columnFormatter"
  >
    <template v-if="column.child">
      <Column
        v-for="(item, index) in column.child"
        :key="index"
        :column="item"
        :formatter="column.formatter"
      ></Column>
    </template>
  </el-table-column>
</template>

<script>
export default {
  name: "Column",
  props: ["column"],
  components: {},
  methods: {},
};
</script>
